package com.dhcc.bpm.modules.api.service.impl;

import com.dhcc.bpm.modules.api.entity.Backservice;
import com.dhcc.bpm.modules.api.mapper.BackserviceMapper;
import com.dhcc.bpm.modules.api.service.IBackserviceService;
import com.dhcc.bpm.modules.common.vo.SelectVo;
import com.dhcc.bpm.modules.api.vo.BackserviceVO;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;


import java.util.List;

/**
 * @ClassName BackserviceServiceImpl
 * @Description 后端服务表 服务实现类
 * @Author daina
 * @Date 2020/2/25 15:22
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Service("opc_backservice")
public class BackserviceServiceImpl extends BaseServiceImpl<BackserviceMapper, Backservice> implements IBackserviceService {
	@Autowired
	private  BackserviceMapper backserviceMapper;
	@Override
	public IPage<BackserviceVO> selectBackservicePage(IPage<BackserviceVO> page, BackserviceVO backservice) {
		return page.setRecords(baseMapper.selectBackservicePage(page, backservice));
	}

	@Override
	public List<SelectVo> selectBackserviceName() {
		return baseMapper.selectBackserviceName();
	}

	@Override
	public BackserviceVO getOneDetail(BackserviceVO backservice) {
		return backserviceMapper.getOneDetail(backservice);
	}

	@Override
	public List<BackserviceVO>  getByBaseProductId(Long baseProductId) {
		return backserviceMapper.getByBaseProductId(baseProductId);
	}

	@Override
	public int deleteByBaseProductId(Long baseProductId) {
		return backserviceMapper.deleteByBaseProductId(baseProductId);
	}

	@Override
	public IPage<BackserviceVO> getPage(IPage<BackserviceVO> page,BackserviceVO backservice) {
		return baseMapper.getPage(page,backservice);
	}
}
